import numpy as np
import os
import sys
import skimage
import skimage.io

root_path = "val2014"

for file_ in os.listdir(root_path):
    file_ = os.path.join(root_path, file_)
    try:
        im = skimage.io.imread(file_)
    except:
        os.remove(file_)